@extends('backend.layouts.app')
@section('title', '卡号管理')
@section('card', 'active')
@section('content')
     <!-- left column -->
          <div class="col-md-12">
            <!-- general form elements -->
            <div class="card card-default">
              <!-- form start -->
              @include('common._errors')
              <form role="form" method="POST" action="{{route('admin.cards.update', $card->id)}}">
                  @csrf
                  @method('patch')
                <div class="card-body"> 
                  <div class="form-group mb-4">
                    <label for="exampleInput1">卡号</label>
                    <input type="text" class="form-control" id="exampleInput1" name="card_num" placeholder="卡号" value="{{$card->card_num}}"  readonly="readonly">
                     <span class="input-group-append"  >
                  </span>
                  </div>  
                  <div class="form-group">
                      <label for="exmpleInput2">卡号金额</label>
                       <input type="text" class="form-control" id="exmpleInput2" name="card_money" placeholder="卡号金额" value="{{$card->card_money}}">
                  </div>
                  <div class="form-group">
                      <label for="info">说明</label>
                      <textarea name="info" id="info" cols="30" rows="10" class="form-control">{{$card->info}}</textarea>
                  </div>
                </div>
                <!-- /.card-body -->

                <div class="card-footer">
                  <button type="submit" class="btn btn-primary">提交</button>
                </div>
              </form>
            </div>
            <!-- /.card -->

          </div>
          <!--/.col (left) -->
@endsection

@section('script')
   <script>
       {{--  $("#random-card").on('click', function (e){
           $("#exampleInput1").val((Math.random()*10000000).toString(16).substr(0,4)+(new Date()).getTime()+Math.random().toString().substr(2,5));
       })  --}}
   </script>
@endsection